home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / MWC & CodeResources / DRVR_DA.c < prev    next >
C/C++ Source or Header  |  1994-01-13  |  973b  |  25 lines

  1. /************************************************************************/
  2. /*    Purpose..:  Device Driver / DA Entry point                            */
  3. /*    Input....:    see Inside Mac                                            */
  4. /*    Return...:    Depends on message                                        */
  5. /************************************************************************/
  6. short main(CntrlParam *paramBlock,DCtlPtr devCtlEnt,short dispatch)
  7. {
  8. //
  9. //    Here A4 is already setup to point to our data segment. There is no need
  10. //    to call long oldA4=SetCurrentA4();/SetA4(oldA4); as in code resources.
  11. //
  12. //    However you have to still have to use "#include <SetupA4.h>;RememberA4();..."
  13. //    when using callback functions.
  14. //
  15.     switch(dispatch)
  16.     {
  17.     case 0:    break;    //    Open
  18.     case 1:    break;    //    Prime        return 1 if async request cannot be completed right away
  19.     case 2:    break;    //    Control        return 1 if async request cannot be completed right away
  20.     case 3:    break;    //    Status        return 1 if async request cannot be completed right away
  21.     case 4:    break;    //    Close
  22.     }
  23.     return 0;
  24. }
  25.